//
//  HomeNetManager.m
//  digitalCurrency
//
//  Created by sunliang on 2018/1/26.
//  Copyright © 2018年 XinHuoKeJi. All rights reserved.
//

#import "HomeNetManager.h"

@implementation HomeNetManager
  
// 获取币种列表
+ (void)getAllCoinInfo:(NSString*)useid CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"getCoinInfo";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    [dic setValue:@"1" forKey:@"pageNum"];
    [dic setValue:@"20" forKey:@"pageSize"];

    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// 获取抢购列表
+ (void)getRushRecordList:(NSString*)useid page:(NSNumber *)page row:(NSNumber *)row CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"millIncomes";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"pageNum"] = page;
    dic[@"pageSize"]  = row;
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// 获取转化收益列表
+ (void)getTransformationEarningsList:(NSString*)useid page:(NSNumber *)page row:(NSNumber *)row CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"getBonusRecord?";
    NSMutableDictionary *dic = [NSMutableDictionary new];
//    dic[@"userId"]   = useid;
    dic[@"pageNum"] = page;
    dic[@"pageSize"]  = row;
    [self requestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// 存币记录
+(void)getMemberDepositInfo:(NSDictionary*)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"getRechange";
    
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
 
// 提币记录
+(void)getWithdrawLogsInfo:(NSDictionary*)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"getChange";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// 兑换
+ (void)getdoExchangeInfo:(NSDictionary*)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/compass/doExchange";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
    
//系统广告
+(void)advertiseBannerCompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"uc/ancillary/system/advertise";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"sysAdvertiseLocation"] = [NSNumber numberWithInteger:0];
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
    
//平台消息
+(void)getPlatformMessageForCompleteHandleWithPageNo:(NSString*)pageNo withPageSize:(NSString *)pageSize CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle{
    NSString *path = @"messages?";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"pageNo"] = pageNo;
    dic[@"pageSize"] = pageSize;
    [self requestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// 抢购信息
+ (void)getFlashsaleBaseInfo:(NSDictionary*)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/getFlashsaleBaseInfo";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

//doFlashsaleInfo
+ (void)doFlashsaleInfo:(NSDictionary*)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/compass/doFlashsale";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
    
// 转入理财
+ (void)doFinancingsWithInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"addManageInvest";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// 转出理财
+ (void)doFinancingsDrawoutWithInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"outManageInvest";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
    
// 转入理财列表
+ (void)doFinancingsListWithInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/getFinancingsLogs";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// 转出理财列表
+ (void)getFinancingsDrawoutLogsWithInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/getFinancingsDrawoutLogs";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

//32 理财收益记录
+ (void)getFinancingsIncomeLogsWithInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"getManageIncome";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

+ (void)getFinancingsInfoWithInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"myManage";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
    
// 总理财收益列表
+ (void)getAllFinancingsIncomeLogsWithInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/getAllFinancingsIncomeLogs";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
    
// 总理财收益头
+ (void)getAllFinancingsInfo:(NSDictionary *)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/getAllFinancingsInfo";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}
    
+(void)getUserAssetInfo:(NSString*)useid CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"myWallet";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"userId"] = useid;
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}


//CE/invest/getBonusesInfo
+(void)getBonusesInfo:(NSDictionary*)dic CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/getBonusesInfo";
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

// +7 奖励规则
+(void)getBonusesLevelWithCompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/getBonusesLevel";
    [self ylNonTokenRequestWithGET:path parameters:@{} successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

//获取游戏列表
+(void)getGameListInfo:(NSString*)userid CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    
    NSString *path = @"CT/invest/game/getGameList";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"userId"] = userid;
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

//获取用户可用CT
+(void)getMemberAsset:(NSString*)userid CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/game/getMemberAsset";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"userId"] = userid;
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

//开始游戏
+(void)startGame:(NSString*)userid gameId:(NSString *)gameid CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/game/startGame";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"userId"] = userid;
    dic[@"gameId"] = gameid;
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

//更新比赛得分
+(void)updateScore:(NSString*)userid gameId:(NSString *)gameid score:(NSString *)score CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/game/updateScore";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"userId"] = userid;
    dic[@"gameId"] = gameid;
    dic[@"score"] = score;
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

//游戏消耗日志
+(void)getGameRankLogs:(NSString*)userid page:(NSString *)page row:(NSString *)row CompleteHandle:(void(^)(id resPonseObj,int code))completeHandle {
    NSString *path = @"CT/invest/game/getGameRankLogs";
    NSMutableDictionary *dic = [NSMutableDictionary new];
    dic[@"userId"] = userid;
    [self ylNonTokenRequestWithGET:path parameters:dic successBlock:^(id resultObject, int isSuccessed) {
        completeHandle(resultObject,isSuccessed);
    }];
}

@end
